import React from 'react'
import './index.css'

export default function Item({item, deleteItem, changeDone}) {

	return (
		<div className='item'>
			<input type='checkbox' checked={item.done} onChange ={() => {changeDone(item.id)}} />
			<span>{item.name}</span>
			<button onClick={() => {deleteItem(item.id)}}>删除</button>
		</div>
	)
}
